<!--
 * @Descripttion: 
 * @Author: voanit
 * @Date: 2022-08-29 17:27:36
 * @LastEditors: voanit
 * @LastEditTime: 2022-08-29 17:54:38
-->
<script setup>
import { computed, ref } from 'vue'
/*目的：求和 */
// const n = computed(() => {
//   return 123
// })

const arr = ref([1, 2, 3, 4, 5])
const total = computed(() => {
  return arr.value.reduce((sum, item) => sum + item, 0)
})
</script>
<template>
  <div>
    御剑乘风来,除魔天地间!===vue3==={{ n }}==={{ total }}
  </div>
</template>
<style lang='less'  scoped>
</style>